import 'package:dirver/widgets/item_widget.dart';
import 'package:flutter/material.dart';

final List<ItemWidgetData> widgetListData = [
  ItemWidgetData(title: '标题',subTitle: '副标题副标题副标题副标题副标题副标题',source: '来源',imgUrl: 'assets/images/card.png',createTime: '2022-01-01',id: '1',),
  ItemWidgetData(title: '标题2',subTitle: '副标题副标题副标题副标题副标题副标题',source: '来源2',imgUrl: 'assets/images/card.png',createTime: '2022-01-01',id: '2',),
];

class WidgetList extends StatelessWidget {
  const WidgetList({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 10),
      child: Column(
        children: [
          Padding(padding: EdgeInsets.only(top: 10),),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text('推荐',style: TextStyle(fontSize: 16,color: Colors.black),),
              Text('更多',style: TextStyle(fontSize: 14,color: Colors.black45),),
            ],
          ),
          Padding(padding: EdgeInsets.all(5),),
          Column(
            spacing: 0,
            children: widgetListData.map((item) => ItemWidget(data: item)).toList(),
          )
        ],
      ),
    );
  }
}